#include "qtrace.h"

quint8 QTrace::m_imbrication = 0;

QTrace::QTrace(QString text,quint8 lvl)
{
	m_text = text;
	m_level = lvl;
	m_imbrication++;
	for(int i=0;i<m_imbrication;i++)
		text.prepend("-");

	__init()->trace((text),m_level);
}

QTrace::~QTrace()
{
	QString t = QString("Fin de " + m_text);
	for(int i=0;i<m_imbrication;i++)
		t.prepend("-");
	__init()->trace((t),m_level);
	m_imbrication--;
}
